-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v0.9.6 #250
Merged
Release v0.9.6 #250
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge stable into master
`six.moves.collections_abc` was added in six 1.13.0: https://github.com/benjaminp/six/blob/master/CHANGES #246
Adds a new base class, `uplink.retry.RetryBackoff`, which can be extended to implement custom backoff strategies. Subclasses can override three methods: - `get_timeout_after_response(request, response)`: Returns the number of seconds to wait before retrying the request, or ``None`` to indicate that the given response should be returned. - `get_timeout_after_exception(request, exc_type, exc_val, exc_tb)`: Returns the number of seconds to wait before retrying the request, or ``None`` to indicate that the given exception should be raised. - `handle_after_final_retry()`: Handles any clean-up necessary following the final retry attempt. An instance of a `RetryBackoff` subclass can be provided through the `backoff` argument of the `@retry` decorator. #238
…229) Fix ``@returns.json`` to cast JSON response (or field referenced by the ``key`` argument) using the ``type`` argument when the given type is callable. This restores behavior that was inadvertently changed in v0.9.3. Example: ```python @uplink.returns.from_json(key=("data", 0, "size"), type=int) @uplink.get("/users/{user}/repos") def get_first_repo_size(self, user): pass ``` ```python assert github.get_first_repo_size("prkumar") == 300 ``` #215
Codecov Report
@@ Coverage Diff @@
## stable #250 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 44 44
Lines 2410 2464 +54
Branches 342 358 +16
=========================================
+ Hits 2410 2464 +54
Continue to review full report at Codecov.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added
uplink.retry.RetryBackoff
, which can be extended toimplement custom backoff strategies. An instance of a
RetryBackoff
subclasscan be provided through the
backoff
argument of the@retry
decorator.(@retry should respect 429
Retry-After
headers #238)Changed
six
to1.13.0
. (Minimum required version of "six" package doesn't work #246)Fixed
@returns.json
to cast JSON response (or field referenced by thekey
argument) using the
type
argument when the given type is callable. Thisrestores behavior that was inadvertently changed in v0.9.3. (v0.9.4 breaks the returns.json decorator with type=int #215)
asyncio.coroutine
in the library code to fix warningsrelated to the function's deprecation in Python 3.8+. (Fix deprecation warning that appear in Python 3.8+ #203)